package com.csun.cmny.provider.dao;

import com.csun.cmny.provider.pojo.SetMeal;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SetMealMapper {
    int deleteByPrimaryKey(Integer setMealId);

    int insert(SetMeal record);

    int insertSelective(SetMeal record);

    SetMeal selectByPrimaryKey(Integer setMealId);

    int updateByPrimaryKeySelective(SetMeal record);

    int updateByPrimaryKey(SetMeal record);
    /**
     * 根据SetMeal查询SetMeal
     * author:liqian
     * date:2018-11-08 14:00
     */
    SetMeal selectBySetMeal(SetMeal setMeal);
    /**
     * 根据套餐id查询套餐信息
     * author:liqian
     * date:2018-11-08 15:12
     */
    SetMeal selectById(Integer setMealId);
    /**
     * 查询某个社区的所有套餐信息
     * author:liqian
     * date:2018-11-08 15:33
     */
    List<SetMeal> showAll(Map<String,Object> queryMap);
    /**
     * 根据套餐id集合批量查询套餐信息
     * author:liqian
     * date:2018-11-08 17:32
     */
    List<SetMeal> selectByList(List<Integer> integerList);
    /**
     * 批量修改套餐
     * author:liqian
     * date:2018-11-08 18:20
     */
    int updateSMBatch(List<SetMeal> setMealList);

    List<SetMeal> sltSetMealsByOid(int oldmanId);

    List<SetMeal> getMealsByExpensectrType(Map<String,Object> query);

    /**
     * 根据机构查询出该机构所有的套餐项目
     * author:lijun
     * date:2019-10-23
     * @param homeId
     * @return
     */

    /**
     * @description: TODO 判断当前套餐是否被已入院，待评估，待缴费状态的老人使用
     * @param: setMealId 套餐Id groupId 机构ID
     * @return: 老人ID 老人入院状态 套餐ID
     * @throws 
     * @author huangxm
     * @date 2019/3/11 13:03 
     */
    List<Map<String,Object>> isMealBeUsed(@Param(value = "setMealId") Integer setMealId,@Param(value = "groupId") Integer groupId);
}